{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\lps29\Dropbox\Party_Interactions_Perceptions\PSRM Submission\Replication Files\fig A3_4.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}10 Apr 2023, 08:54:31

{com}. do "C:\Users\lps29\AppData\Local\Temp\STD08000000.tmp"
{txt}
{com}. 
. 
. /* This do file provides the code to generate Figure A3.4 in Appendix 3. */
. 
. global dataDir "~/Dropbox/Party_Interactions_Perceptions/PSRM Submission/Replication Files"
{txt}
{com}. use "$dataDir/replication_data.dta", clear
{txt}
{com}. 
. 
. 
. set more off
{txt}
{com}. foreach i of numlist 1 2{c -(}
{txt}  2{com}. 
. replace dyad_name`i'="AfD" if dyad_name`i'=="afd"
{txt}  3{com}. replace dyad_name`i'="Alt" if dyad_name`i'=="alt"
{txt}  4{com}. replace dyad_name`i'="BQ" if dyad_name`i'=="bq"
{txt}  5{com}. replace dyad_name`i'="CDU" if dyad_name`i'=="cdu"
{txt}  6{com}. replace dyad_name`i'="Cons" if dyad_name`i'=="cons"
{txt}  7{com}. replace dyad_name`i'="KF" if dyad_name`i'=="cpp"
{txt}  8{com}. replace dyad_name`i'="DF" if dyad_name`i'=="dpp"
{txt}  9{com}. replace dyad_name`i'="Enh" if dyad_name`i'=="enh"
{txt} 10{com}. replace dyad_name`i'="FDP" if dyad_name`i'=="fdp"
{txt} 11{com}. replace dyad_name`i'="Lab" if dyad_name`i'=="lab"
{txt} 12{com}. replace dyad_name`i'="Lib" if dyad_name`i'=="lib"
{txt} 13{com}. replace dyad_name`i'="LibDem" if dyad_name`i'=="libdem"
{txt} 14{com}. replace dyad_name`i'="Linke" if dyad_name`i'=="linke"
{txt} 15{com}. replace dyad_name`i'="NDP" if dyad_name`i'=="ndp"
{txt} 16{com}. replace dyad_name`i'="NB" if dyad_name`i'=="new"
{txt} 17{com}. replace dyad_name`i'="RadVen" if dyad_name`i'=="rad"
{txt} 18{com}. replace dyad_name`i'="SDP" if dyad_name`i'=="sdp"
{txt} 19{com}. replace dyad_name`i'="SNP" if dyad_name`i'=="snp"
{txt} 20{com}. replace dyad_name`i'="SPD" if dyad_name`i'=="spd"
{txt} 21{com}. replace dyad_name`i'="SF" if dyad_name`i'=="spp"
{txt} 22{com}. replace dyad_name`i'="UKIP" if dyad_name`i'=="ukip"
{txt} 23{com}. replace dyad_name`i'="Ven" if dyad_name`i'=="ven"
{txt} 24{com}. replace dyad_name`i'="Green" if dyad_name`i'=="green"
{txt} 25{com}. 
. 
. {c )-}
{txt}(6,128 real changes made)
(2,556 real changes made)
(2,352 real changes made)
(15,320 real changes made)
(17,643 real changes made)
(3,834 real changes made)
(8,946 real changes made)
(5,112 real changes made)
(9,192 real changes made)
(9,592 real changes made)
(4,704 real changes made)
(4,388 real changes made)
(3,064 real changes made)
(9,408 real changes made)
(1,278 real changes made)
(7,668 real changes made)
(11,502 real changes made)
(1,990 real changes made)
(12,256 real changes made)
(6,390 real changes made)
(995 real changes made)
(10,224 real changes made)
(0 real changes made)
(9,192 real changes made)
(8,946 real changes made)
(7,056 real changes made)
(0 real changes made)
(2,352 real changes made)
(7,668 real changes made)
(2,556 real changes made)
(6,390 real changes made)
(6,128 real changes made)
(2,398 real changes made)
(16,206 real changes made)
(4,796 real changes made)
(12,256 real changes made)
(0 real changes made)
(10,224 real changes made)
(3,834 real changes made)
(0 real changes made)
(7,194 real changes made)
(3,064 real changes made)
(5,112 real changes made)
(6,786 real changes made)
(1,278 real changes made)
(31,106 real changes made)

{com}. 
. capture drop dyadname
{txt}
{com}. egen dyadname=concat(dyad_name1 dyad_name2), punct("-")
{txt}
{com}. 
. 
. capture drop countryyear
{txt}
{com}. egen countryyear=concat(country year)
{txt}
{com}. 
. 
. 
. 
. /* UK 2017*/
. 
. 
. set more off
{txt}
{com}. 
. local figure=1
{txt}
{com}. levelsof dyadname if countryyear=="UK2017" & coop!=., local(levels) 
{txt}`"Cons-Lab"' `"Cons-LibDem"' `"Cons-SNP"' `"Cons-UKIP"' `"Lab-Green"' `"Lab-LibDem"' `"Lab-SNP"' `"Lab-UKIP"'

{com}.  foreach l of local levels {c -(}
{txt}  2{com}.  
. sum coop if dyadname=="`l'" & countryyear=="UK2017" & coop!=.
{txt}  3{com}. 
. local ll2 : di %3.2f r(mean)
{txt}  4{com}. 
.  
. twoway histogram coop if dyadname=="`l'" & countryyear=="UK2017" ///
>  & coop!=., ///
>  discrete percent xtitle("") ytitle("") color(gray) xline(`ll2') ///
>  text(26 `ll2' "`ll2'") title("`l'") graphregion(margin(0 0 0 0)) plotregion(margin(0 0 0 0)) ///
>  name(`ctryyear'fig`figure', replace) yscale(r(0 30)) nodraw
{txt}  5{com}.  
.  local figure=`figure'+1
{txt}  6{com}.  
.  {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    3.398432    2.727034          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    5.259444    2.189907          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    3.884533    2.531301          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    4.674982    2.602779          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    5.182466    2.402639          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    4.928011     2.16866          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    5.068425    2.345273          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    3.285103    2.782403          0         10
{txt}
{com}.  
.  
.  set more off
{txt}
{com}.  capture drop partiesname
{txt}
{com}.  gen partiesname=""
{txt}(154,542 missing values generated)

{com}.  
.   capture drop avg
{txt}
{com}.  gen avg=.
{txt}(154,542 missing values generated)

{com}.  
.  local row=1
{txt}
{com}.  levelsof dyadname if countryyear=="UK2017", local(levels) 
{txt}`"Cons-Lab"' `"Cons-LibDem"' `"Cons-SNP"' `"Cons-UKIP"' `"Lab-Green"' `"Lab-LibDem"' `"Lab-SNP"' `"Lab-UKIP"' `"LibDem-SNP"'

{com}.  foreach l of local levels {c -(}
{txt}  2{com}.  sum coop if dyadname=="`l'" & countryyear=="UK2017" & coop!=.
{txt}  3{com}. replace avg=r(mean) in `row'
{txt}  4{com}.   replace partiesname="`l'" in `row'
{txt}  5{com}.   local row=`row'+1
{txt}  6{com}. 
.  {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    3.398432    2.727034          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str1{sf}{txt} now {bf}{res}str8{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    5.259444    2.189907          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str8{sf}{txt} now {bf}{res}str11{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    3.884533    2.531301          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    4.674982    2.602779          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    5.182466    2.402639          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    4.928011     2.16866          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    5.068425    2.345273          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,403    3.285103    2.782403          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}          0
{txt}(0 real changes made)
(1 real change made)

{com}.  capture drop groupid
{txt}
{com}.  egen groupid=group(partiesname)
{txt}(154533 missing values generated)

{com}. 
. graph combine fig2 fig5 fig7 fig6 fig4 fig3 fig1 fig8 , ///
>  l1(% of Respondents) b1(Perceived Cooperation Scores) rows(2) ///
>  note("Dashed line indicates the average cooperation score",size(vsmall)) ///
>  ycommon scale(1.15) title(UK 2017)  
{res}{txt}
{com}.  
. 
.  /* UK 2019 */
.  
.  set more off
{txt}
{com}. 
. local figure=1
{txt}
{com}. levelsof dyadname if countryyear=="UK2019" & coop!=., local(levels) 
{txt}`"Cons-Green"' `"Cons-Lab"' `"Cons-LibDem"' `"Cons-SNP"' `"Cons-UKIP"' `"Lab-Green"' `"Lab-LibDem"' `"Lab-SNP"' `"Lab-UKIP"' `"LibDem-Green"' `"LibDem-SNP"' `"LibDem-UKIP"' `"SNP-Green"' `"SNP-UKIP"' `"UKIP-Green"'

{com}.  foreach l of local levels {c -(}
{txt}  2{com}.  
. sum coop if dyadname=="`l'" & countryyear=="UK2019" & coop!=.
{txt}  3{com}. 
. local ll2 : di %3.2f r(mean)
{txt}  4{com}. 
.  
. twoway histogram coop if dyadname=="`l'" & countryyear=="UK2019" ///
>  & coop!=., ///
>  discrete percent xtitle("") ytitle("") color(gray) xline(`ll2') ///
>  text(28 `ll2' "`ll2'") title("`l'") graphregion(margin(0 0 0 0)) plotregion(margin(0 0 0 0)) ///
>  name(`ctryyear'fig`figure', replace) yscale(r(0 30)) nodraw
{txt}  5{com}.  
.  local figure=`figure'+1
{txt}  6{com}.  
.  {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    3.642211    2.170923          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995     2.38593    2.299463          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    5.141709    2.078688          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    3.571859    2.439945          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.442211    2.679647          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.811055    2.193478          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995     4.61407    2.050127          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.936683     2.18763          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.748744    2.394071          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    5.057286     1.99943          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.382915    1.963733          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.889447     2.22837          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.519598    2.188861          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.861307    2.412422          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.609045    2.285225          0         10
{txt}
{com}.  
.  
.  set more off
{txt}
{com}.  capture drop partiesname
{txt}
{com}.  gen partiesname=""
{txt}(154,542 missing values generated)

{com}.  
.   capture drop avg
{txt}
{com}.  gen avg=.
{txt}(154,542 missing values generated)

{com}.  
.  local row=1
{txt}
{com}.  levelsof dyadname if countryyear=="UK2019", local(levels) 
{txt}`"Cons-Green"' `"Cons-Lab"' `"Cons-LibDem"' `"Cons-SNP"' `"Cons-UKIP"' `"Lab-Green"' `"Lab-LibDem"' `"Lab-SNP"' `"Lab-UKIP"' `"LibDem-Green"' `"LibDem-SNP"' `"LibDem-UKIP"' `"SNP-Green"' `"SNP-UKIP"' `"UKIP-Green"'

{com}.  foreach l of local levels {c -(}
{txt}  2{com}.  sum coop if dyadname=="`l'" & countryyear=="UK2019" & coop!=.
{txt}  3{com}. replace avg=r(mean) in `row'
{txt}  4{com}.   replace partiesname="`l'" in `row'
{txt}  5{com}.   local row=`row'+1
{txt}  6{com}. 
.  {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    3.642211    2.170923          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str1{sf}{txt} now {bf}{res}str10{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995     2.38593    2.299463          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    5.141709    2.078688          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str10{sf}{txt} now {bf}{res}str11{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    3.571859    2.439945          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.442211    2.679647          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.811055    2.193478          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995     4.61407    2.050127          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.936683     2.18763          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.748744    2.394071          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    5.057286     1.99943          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str11{sf}{txt} now {bf}{res}str12{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.382915    1.963733          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.889447     2.22837          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    4.519598    2.188861          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.861307    2.412422          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}        995    2.609045    2.285225          0         10
{txt}(1 real change made)
(1 real change made)

{com}.  capture drop groupid
{txt}
{com}.  egen groupid=group(partiesname)
{txt}(154527 missing values generated)

{com}. 
.  
. graph combine fig3 fig10 fig8 fig6 fig7 fig13 fig5 fig11 fig1 ///
> fig4 fig12 fig14 fig9 fig15 fig2 , ///
>  l1(% of Respondents) b1(Perceived Cooperation Scores) rows(3) ///
>  note("Dashed line indicates the average cooperation score",size(vsmall)) ///
>  ycommon scale(1.15) title(UK 2019)  
{res}{txt}
{com}.  
. 
. 
. 
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\lps29\Dropbox\Party_Interactions_Perceptions\PSRM Submission\Replication Files\fig A3_4.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}10 Apr 2023, 08:56:11
{txt}{.-}
{smcl}
{txt}{sf}{ul off}